package Day03_java方法.java12_方法定义;
public class 方法定义 {
    //main方法
    public static void main(String[] args) {
        int sum = add(1,2);
        double sum1 = add(1.0,2.0);
        System.out.println(sum1);
    }
    //加法
    public static int add(int a,int b){
        return a+b;
    }
    public static double add(double a,double b){
        return a+b;
    }
}
